#include<bits/stdc++.h>
#include<map>
using namespace std;
int main()
{
	map<int, int > amap;

	amap[1] = 2;
//	amap[2]->3;
	cout << "amap[1]=" << amap[1] << endl;
//	cout<<"amap[2]"<<amap[2];
	cout << amap[2] << endl;
	cout << "amap.size()=" << amap.size() << endl;
	cout << "amap.empty()=" << amap.empty() << endl;
//	cout<<"amap.clear()="<<amap.clear()<<endl;
//	cout<<"amap.empty()="<<amap.empty()<<endl;
//	cout<<amap.find();
	cout << endl << "============" << endl;
	map<int, string> node;
	node[1234676543] = "张三";
	//翻译
	cout << node[1234676543] << endl;

	cout << endl << "============" << endl;

	map<int, string> node2;
	node2[21] = "王五";
	node2[22] = "赵六";
	node2[23] = "孙七";
	map<int, string>::iterator iter;
	for (iter = node2.begin() ; iter != node2.end() ; ++iter) {
		cout << iter->first << "--" << iter->second << endl;

	}


	cout << endl << "============" << endl;
	//反向迭代器

	map<int, string>::reverse_iterator iter2;
	for (iter2 = node2.rbegin() ; iter2 != node2.rend() ; ++iter2) {
		cout << iter2->first << "--" << iter2->second << endl;
	}

	iter = node.lower_bound(14);
	cout << iter->first;
	cout << endl << "============" << endl;
	int n  = 25;
//	cout << 24 / 3;
	cout << n / 3 + n % 3;
	return 0;
}
